<%@page language="java" contentType="text/html; charset=gb2312"%>
<%@ page import = "java.util.*" %>
<%@ page import = "java.io.*" %>
<%@ page import = "java.net.*" %>

<%
	URL url = new URL("http://problem.corp.platform.com/cgi-bin/problemEnh/search");
	//URL url = new URL("http://www.google.com");
	URLConnection conn = url.openConnection();
	InputStream is = conn.getInputStream();
	byte[] bytes = new byte[1024];
	int count = 0 ;
	StringBuffer sb = new StringBuffer();
	while( true ) {
		count = is.read(bytes);
		if( count == -1 ) {
			break;
		}
		sb.append(new String(bytes, 0, count));
	}
	String s;
	int pos;

	s = "action=\"query\"";
	pos = sb.indexOf(s);
	if(pos >= 0) {
		sb.replace(pos, pos + s.length(), "action=\"create\"");
	}

	s = "method=\"post\"";
	pos = sb.indexOf(s);
	if(pos >= 0) {
		sb.replace(pos, pos + s.length(), "method=\"get\"");
	}

	out.print(sb.toString());
%>